home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TOTDEMO.ARJ / DEMDR2.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  731b  |  35 lines

  1. program DemoDirectoryTwo;
  2. {demdr2 - determining chosen files}
  3.  
  4. Uses DOS, CRT,
  5.      totFAST, totLIST;
  6.  
  7. Var
  8.    ListWin:  ListDirObj;
  9.    Tot,L:longint;
  10.  
  11. begin
  12.    Screen.Clear(white,'░'); {paint the screen}
  13.    with ListWin do
  14.    begin
  15.       Init;
  16.       ReadFiles('*.*',AnyFile);
  17.       Go;
  18.       Win^.Remove;
  19.       if (LastKey = 27) or (Lastkey = 600) then
  20.          writeln('You escaped!')
  21.       else
  22.       begin
  23.          writeln('The highlighted file was '+GetHiString);
  24.          writeln('The tagged files were: ');
  25.          Tot := FileList^.TotalNodes;
  26.          for L := 1 to Tot do
  27.              if GetStatus(L,0) then
  28.                 writeln(GetString(L,0,0));
  29.       end;
  30.       Done;
  31.    end;
  32. end.
  33.  
  34.  
  35.